package com.hsh.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hsh.entity.DbDispose;
import com.hsh.entity.DbUser;
import com.hsh.entity.OperationLog;
import com.hsh.mapper.DbDisposeMapper;
import com.hsh.mapper.OperationLogMapper;
import com.hsh.service.IDbUserService;
import com.hsh.service.IDisposeService;
import com.hsh.utils.vo.ResultBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * </p>
 *
 * @author 黄思海
 * @date 2021/7/10 15:21
 */
@Service
public class DisposeServiceImpl extends ServiceImpl<DbDisposeMapper, DbDispose> implements IDisposeService {
    @Autowired
    private IDbUserService userService;

    @Override
//    @Transactional(rollbackFor = Exception.class)
    public ResultBase findTest() {

        DbUser user1 = userService.getById("yxb");
        System.out.println(user1);
        boolean b = userService.removeById("123123");
        System.out.println(b);
        List<DbUser> list = userService.list();
        System.out.println(list);
        DbUser user2 = userService.getById("yxb");
        System.out.println(user2);
        return ResultBase.getSuccessResult();
    }
}
